﻿@model IEnumerable<OurWedding1.Models.GuestGroup>
@using System.Globalization
@using OurWedding1

<table id="guestGroups" style="width: 100%">
    <thead>
        <tr>

            <th>
                @Html.DisplayNameFor(m => m.Name)
            </th>
            <th>
                @Html.DisplayNameFor(m => m.Guests)
            </th>
            <th></th>
        </tr>
    </thead>

    <tbody>
        @foreach (var item in Model)
        {
            <tr>

                <td>
                    @Html.ActionLink(item.Name, "Details", new { id = item.GuestGroupId })
                </td>
                <td>
                    @(item.Guests == null ? @Resources.None : item.Guests.Count.ToString(CultureInfo.InvariantCulture))
                </td>
                <td style="text-align: right">
                    @Html.ActionLink(@Resources.Edit, "Edit", new { id = item.GuestGroupId }, new { @class = "editIconLink" })
                    @Html.ActionLink(@Resources.Delete, "Delete", new { id = item.GuestGroupId }, new { @class = "deleteIconLink" })
                </td>
            </tr>
        }
    </tbody>
</table>
